simplest function to convert string type data to integer type data